package common;

public class CalcTask {
    public Double RunWithResult() {
        System.out.println(Thread.currentThread() + "开始：" + System.currentTimeMillis());
        try {
            Thread.sleep(2000);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        System.out.println(Thread.currentThread() + "结束：" + System.currentTimeMillis());
        return 1.2;
    }
    public void Run() {
        System.out.println(Thread.currentThread() + "开始：" + System.currentTimeMillis());
        try {
            Thread.sleep(2000);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        System.out.println(Thread.currentThread() + "结束：" + System.currentTimeMillis());
    }
}
